3.2.45 \(\int x^{-1+2 n} \sin (a+b x^n) \, dx\) [145]

Optimal. Leaf size=35 \[ -\frac {x^n \cos \left (a+b x^n\right )}{b n}+\frac {\sin \left (a+b x^n\right )}{b^2 n} \]

[Out]

-x^n*cos(a+b*x^n)/b/n+sin(a+b*x^n)/b^2/n

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3460, 3377, 2717} \begin {gather*} \frac {\sin \left (a+b x^n\right )}{b^2 n}-\frac {x^n \cos \left (a+b x^n\right )}{b n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^(-1 + 2*n)*Sin[a + b*x^n],x]

[Out]

-((x^n*Cos[a + b*x^n])/(b*n)) + Sin[a + b*x^n]/(b^2*n)

Rule 2717

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3460

Int[(x_)^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sin[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rubi steps

\begin {align*} \int x^{-1+2 n} \sin \left (a+b x^n\right ) \, dx &=\frac {\text {Subst}\left (\int x \sin (a+b x) \, dx,x,x^n\right )}{n}\\ &=-\frac {x^n \cos \left (a+b x^n\right )}{b n}+\frac {\text {Subst}\left (\int \cos (a+b x) \, dx,x,x^n\right )}{b n}\\ &=-\frac {x^n \cos \left (a+b x^n\right )}{b n}+\frac {\sin \left (a+b x^n\right )}{b^2 n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 30, normalized size = 0.86 \begin {gather*} \frac {-b x^n \cos \left (a+b x^n\right )+\sin \left (a+b x^n\right )}{b^2 n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 + 2*n)*Sin[a + b*x^n],x]

[Out]

(-(b*x^n*Cos[a + b*x^n]) + Sin[a + b*x^n])/(b^2*n)

________________________________________________________________________________________

Maple [A]
time = 0.05, size = 44, normalized size = 1.26

method result size
risch \(-\frac {x^{n} \cos \left (a +b \,x^{n}\right )}{b n}+\frac {\sin \left (a +b \,x^{n}\right )}{b^{2} n}\) \(36\)
default \(\frac {\sin \left (a +b \,x^{n}\right )-\left (a +b \,x^{n}\right ) \cos \left (a +b \,x^{n}\right )+a \cos \left (a +b \,x^{n}\right )}{n \,b^{2}}\) \(44\)
meijerg error in int/gproduct: numeric exception: division by zero\ N/A

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1+2*n)*sin(a+b*x^n),x,method=_RETURNVERBOSE)

[Out]

1/n/b^2*(sin(a+b*x^n)-(a+b*x^n)*cos(a+b*x^n)+a*cos(a+b*x^n))

________________________________________________________________________________________

Maxima [A]
time = 0.32, size = 32, normalized size = 0.91 \begin {gather*} -\frac {b x^{n} \cos \left (b x^{n} + a\right ) - \sin \left (b x^{n} + a\right )}{b^{2} n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+2*n)*sin(a+b*x^n),x, algorithm="maxima")

[Out]

-(b*x^n*cos(b*x^n + a) - sin(b*x^n + a))/(b^2*n)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 32, normalized size = 0.91 \begin {gather*} -\frac {b x^{n} \cos \left (b x^{n} + a\right ) - \sin \left (b x^{n} + a\right )}{b^{2} n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+2*n)*sin(a+b*x^n),x, algorithm="fricas")

[Out]

-(b*x^n*cos(b*x^n + a) - sin(b*x^n + a))/(b^2*n)

________________________________________________________________________________________

Sympy [A]
time = 29.25, size = 53, normalized size = 1.51 \begin {gather*} \begin {cases} \log {\left (x \right )} \sin {\left (a \right )} & \text {for}\: b = 0 \wedge n = 0 \\\frac {x^{2 n} \sin {\left (a \right )}}{2 n} & \text {for}\: b = 0 \\\log {\left (x \right )} \sin {\left (a + b \right )} & \text {for}\: n = 0 \\- \frac {x^{n} \cos {\left (a + b x^{n} \right )}}{b n} + \frac {\sin {\left (a + b x^{n} \right )}}{b^{2} n} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+2*n)*sin(a+b*x**n),x)

[Out]

Piecewise((log(x)*sin(a), Eq(b, 0) & Eq(n, 0)), (x**(2*n)*sin(a)/(2*n), Eq(b, 0)), (log(x)*sin(a + b), Eq(n, 0
)), (-x**n*cos(a + b*x**n)/(b*n) + sin(a + b*x**n)/(b**2*n), True))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+2*n)*sin(a+b*x^n),x, algorithm="giac")

[Out]

integrate(x^(2*n - 1)*sin(b*x^n + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int x^{2\,n-1}\,\sin \left (a+b\,x^n\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(2*n - 1)*sin(a + b*x^n),x)

[Out]

int(x^(2*n - 1)*sin(a + b*x^n), x)

________________________________________________________________________________________